package org.yanghaokun.org.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yanghaokun.basic.service.impl.BaseServiceImpl;
import org.yanghaokun.org.domain.DictionaryType;
import org.yanghaokun.org.mapper.DictionaryDetailMapper;
import org.yanghaokun.org.mapper.DictionaryTypeMapper;
import org.yanghaokun.org.service.IDictionaryTypeService;

import java.util.List;

@Service
public class DictionaryTypeServiceImpl extends BaseServiceImpl<DictionaryType> implements IDictionaryTypeService {

    @Autowired
    private DictionaryDetailMapper detailMapper;
    @Autowired
    private DictionaryTypeMapper typeMapper;

    @Override
    public void doubleDel(Long typeId) {
        detailMapper.deleteBytypeId(typeId);
        typeMapper.delete(typeId);
    }
}
